<nz-spin [nzSpinning]="userLoading">
  @if (user) {
    <div class="main">
      <div class="left">
        <form nz-form nzLayout="vertical" #f="ngForm" (submit)="save()" se-container="1">
          <se label="用户名" error="请输入用户名!">
            <input nz-input [(ngModel)]="user.username" name="username" disabled />
          </se>
          <se label="联系电话" error="请输入您的联系电话!">
            <input nz-input [(ngModel)]="user.phone" name="phone" required />
          </se>
          <se label="真实姓名" error="请输入真实姓名!">
            <input nz-input [(ngModel)]="user.name" name="name" required />
          </se>
          <se>
            <button nz-button nzType="primary" [disabled]="f.invalid">更新基本信息</button>
          </se>
        </form>
      </div>
      <div class="right">
        <div class="avatar_title">头像</div>
        <div class="avatar"><img src="{{ user.avatar }}" alt="头像" /></div>
        <nz-upload nzAction="/user/avatar" [nzShowUploadList]="false" [nzDisabled]="true">
          <button nz-button class="button_view">
            <i nz-icon nzType="upload"></i>
            <span>更换头像(敬请期待)</span>
          </button>
        </nz-upload>
      </div>
    </div>
  }
</nz-spin>
